<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: D:/Projects/MiXiM/extsrc/mixim/src/modules/analogueModel/SimplePathlossModel.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00404.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">SimplePathlossModel.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef PATHLOSSMODEL_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define PATHLOSSMODEL_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;cstdlib&gt;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;MiXiMDefs.h&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;AnalogueModel.h&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;Mapping.h&quot;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;BaseWorldUtility.h&quot;</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="keyword">class </span><a class="code" href="a00199.html" title="Basic implementation of a SimplePathlossModel that uses SimplePathlossConstMapping (that is subclasse...">SimplePathlossModel</a>;
<a name="l00012"></a>00012 
<a name="l00024"></a><a class="code" href="a00198.html">00024</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00198.html" title="Mapping that represents a Pathloss-function.">SimplePathlossConstMapping</a> : <span class="keyword">public</span> <a class="code" href="a00194.html" title="Abstract subclass of ConstMapping which can be used as base for any ConstMapping implementation with ...">SimpleConstMapping</a>
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026 <span class="keyword">private</span>:
<a name="l00029"></a>00029   <a class="code" href="a00198.html" title="Mapping that represents a Pathloss-function.">SimplePathlossConstMapping</a>&amp; <a class="code" href="a00194.html#aa49498d175e63415d1b16656ffe2e28b" title="SimpleConstMapping assignment operator.">operator=</a>(<span class="keyword">const</span> <a class="code" href="a00198.html" title="Mapping that represents a Pathloss-function.">SimplePathlossConstMapping</a>&amp;);
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">protected</span>:
<a name="l00033"></a><a class="code" href="a00198.html#a5256f04ca6630c73e38c611472d330a7">00033</a>   <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="a00198.html#a5256f04ca6630c73e38c611472d330a7" title="The factor dependent on the distance of the transmission.">distFactor</a>;
<a name="l00035"></a><a class="code" href="a00198.html#acd7441a6db213de39f2286e7e91110b6">00035</a>   <a class="code" href="a00199.html" title="Basic implementation of a SimplePathlossModel that uses SimplePathlossConstMapping (that is subclasse...">SimplePathlossModel</a>* <a class="code" href="a00198.html#acd7441a6db213de39f2286e7e91110b6" title="Pointer to the model.">model</a>;
<a name="l00037"></a><a class="code" href="a00198.html#af4da6a90c9477ea1de2eccfd9ae95e55">00037</a>   <span class="keywordtype">bool</span> <a class="code" href="a00198.html#af4da6a90c9477ea1de2eccfd9ae95e55" title="Is the Signal to attenuate defined over frequency?">hasFrequency</a>;
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="keyword">public</span>:
<a name="l00044"></a>00044   <a class="code" href="a00198.html" title="Mapping that represents a Pathloss-function.">SimplePathlossConstMapping</a>(<span class="keyword">const</span> <a class="code" href="a00086.html" title="Represents a set of dimensions which is used to define over which dimensions a mapping is defined (th...">DimensionSet</a>&amp; dimensions,
<a name="l00045"></a>00045                  <a class="code" href="a00199.html" title="Basic implementation of a SimplePathlossModel that uses SimplePathlossConstMapping (that is subclasse...">SimplePathlossModel</a>* model,
<a name="l00046"></a>00046                  <span class="keyword">const</span> <span class="keywordtype">double</span> distFactor);
<a name="l00047"></a>00047 
<a name="l00050"></a>00050   <a class="code" href="a00198.html" title="Mapping that represents a Pathloss-function.">SimplePathlossConstMapping</a>(<span class="keyword">const</span> <a class="code" href="a00198.html" title="Mapping that represents a Pathloss-function.">SimplePathlossConstMapping</a>&amp;);
<a name="l00056"></a>00056   <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="a00194.html#aeb10c744b8f4c6df092332b6228e209e" title="Returns the value of the mapping at the passed position.">getValue</a>(<span class="keyword">const</span> <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a>&amp; pos) <span class="keyword">const</span>;
<a name="l00057"></a>00057 
<a name="l00063"></a><a class="code" href="a00198.html#a07a068298d3682405c07849bbcafac3e">00063</a>   <a class="code" href="a00058.html" title="Represents a not changeable mapping (mathematical function) from domain with at least the time to a A...">ConstMapping</a>* <a class="code" href="a00194.html#a49da397ee4ea25a6bdcf7f08dc6e2ed5" title="creates a clone of this mapping.">constClone</a>()<span class="keyword"> const</span>
<a name="l00064"></a>00064 <span class="keyword">  </span>{
<a name="l00065"></a>00065     <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="a00198.html" title="Mapping that represents a Pathloss-function.">SimplePathlossConstMapping</a>(*<span class="keyword">this</span>);
<a name="l00066"></a>00066   }
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 };
<a name="l00069"></a>00069 
<a name="l00070"></a>00070 
<a name="l00093"></a><a class="code" href="a00199.html">00093</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00199.html" title="Basic implementation of a SimplePathlossModel that uses SimplePathlossConstMapping (that is subclasse...">SimplePathlossModel</a> : <span class="keyword">public</span> <a class="code" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a>
<a name="l00094"></a>00094 {
<a name="l00095"></a>00095 <span class="keyword">protected</span>:
<a name="l00096"></a>00096   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00198.html" title="Mapping that represents a Pathloss-function.">SimplePathlossConstMapping</a>;
<a name="l00097"></a>00097 
<a name="l00099"></a><a class="code" href="a00199.html#a064c70c5c35a1bcb1d6450722d70ec1d">00099</a>   <span class="keywordtype">double</span> <a class="code" href="a00199.html#a064c70c5c35a1bcb1d6450722d70ec1d" title="Path loss coefficient.">pathLossAlphaHalf</a>;
<a name="l00100"></a>00100 
<a name="l00102"></a><a class="code" href="a00199.html#a48902a15501db259c953348f4d50313a">00102</a>   <span class="keywordtype">double</span> <a class="code" href="a00199.html#a48902a15501db259c953348f4d50313a" title="carrier frequency needed for calculation">carrierFrequency</a>;
<a name="l00103"></a>00103 
<a name="l00105"></a><a class="code" href="a00199.html#abadf2a2885c8e8597713a7d14201d732">00105</a>   <span class="keywordtype">bool</span> <a class="code" href="a00199.html#abadf2a2885c8e8597713a7d14201d732" title="Information needed about the playground.">useTorus</a>;
<a name="l00106"></a>00106 
<a name="l00108"></a><a class="code" href="a00199.html#ad42603e06762d9ccafdc2ef39ec8552d">00108</a>   <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a> <a class="code" href="a00199.html#ad42603e06762d9ccafdc2ef39ec8552d" title="The size of the playground.">playgroundSize</a>;
<a name="l00109"></a>00109 
<a name="l00111"></a><a class="code" href="a00199.html#a659b7135ed6ca2282617b863362f21f4">00111</a>   <span class="keywordtype">bool</span> <a class="code" href="a00199.html#a659b7135ed6ca2282617b863362f21f4" title="Whether debug messages should be displayed.">debug</a>;
<a name="l00112"></a>00112 
<a name="l00113"></a>00113 <span class="keyword">public</span>:
<a name="l00129"></a><a class="code" href="a00199.html#aedf82487a8fd5d18d251cd357b431d2a">00129</a>   <a class="code" href="a00199.html" title="Basic implementation of a SimplePathlossModel that uses SimplePathlossConstMapping (that is subclasse...">SimplePathlossModel</a>()
<a name="l00130"></a>00130       : pathLossAlphaHalf(0)
<a name="l00131"></a>00131       , carrierFrequency(0)
<a name="l00132"></a>00132       , useTorus(false)
<a name="l00133"></a>00133       , playgroundSize()
<a name="l00134"></a>00134       , debug(false)
<a name="l00135"></a>00135   { }
<a name="l00136"></a>00136 
<a name="l00145"></a>00145   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="a00009.html#a9c52493cdf1baa4110a83869e8bc13c5" title="Initialize the analog model from XML map data.">initFromMap</a>(<span class="keyword">const</span> ParameterMap&amp;);
<a name="l00146"></a>00146 
<a name="l00151"></a>00151   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00009.html#a3242bc36a68dab53551d4ab1f1dab010" title="Has to be overriden by every implementation.">filterSignal</a>(airframe_ptr_t, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp;, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp;);
<a name="l00152"></a>00152 
<a name="l00163"></a>00163   <span class="keyword">virtual</span> <span class="keywordtype">double</span> calcPathloss(<span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; receiverPos, <span class="keyword">const</span> <a class="code" href="a00065.html" title="Class for storing 3D coordinates.">Coord</a>&amp; sendersPos);
<a name="l00164"></a>00164 };
<a name="l00165"></a>00165 
<a name="l00166"></a>00166 <span class="preprocessor">#endif </span><span class="comment">/*PATHLOSSMODEL_H_*/</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>SimplePathlossModel.h</b>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:30 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
